package com.qiangesoft.miniapp.exception;

import lombok.Getter;

/**
 * 异常信息
 *
 * @author qiangesoft
 * @date 2024-07-17
 */
@Getter
public enum CommonExceptionEnum implements AbstractExceptionEnum {

    SUCCESS(200, "请求成功"),

    FAILED(500, "服务器内部错误"),

    /**
     * 方法参数不合法
     */
    METHOD_ARGUMENT_NOT_VALID(400, "方法参数不合法"),
    HTTP_MESSAGE_NOT_READABLE(400, "消息不可重复读取"),
    METHOD_NOT_ALLOWED(400, "方法不允许"),
    NOT_FOUND(404, "方法未找到"),
    BAD_REQUEST(400, "糟糕的请求"),


    BIND_FAIL(500, "账号绑定失败"),


    ;

    private Integer code;

    private String message;

    CommonExceptionEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

}
